home *** CD-ROM | disk | FTP | other *** search
- Path: frco.com!usenet
- From: Jadam@tcmail.frco.com (Jim Adam)
- Newsgroups: comp.lang.c++
- Subject: Increasing size of fstream's buffer: Useful?
- Date: 23 Jan 1996 22:08:59 GMT
- Organization: Fisher Rosemount Systems
- Message-ID: <4e3m9r$6cb@rolaids.frco.com>
- NNTP-Posting-Host: primrose.frco.com
- Mime-Version: 1.0
- X-Newsreader: WinVN 0.93.11
-
- Y'all,
-
- My application does a bit of file writing/reading using the standard
- fstream classes. I understand that I can change the size of the
- buffer used by these classes via the setbuf() member function.
-
- The real question is: is this worth it? I expect to do some
- profiling on my own, but I'd like to hear from anyone
- who's tried this and/or has opinions on it. Given modern "disk
- caching" that happens at the operating system level, I wonder
- if building a larger cache at the application level will have
- any effect on performance or not. Also, I'm still not sure
- exactly how this streambuf is used internally. So it's hard
- to predict what effect a larger buffer might have on performance.
-
- (BTW: By poking around, I discovered that the default cache used
- by fstream on my system is 512 bytes. --I don't think there's
- any programmatic way to check the size of the cache at run-time,
- since the streambuf::blen() function is protected.)
-
- Thanks,
- Jim
- Jadam@tcmail.frco.com
-
-